package cn.lingyangwl.agile.food.model.constants;

/**
 * 商城相关常量
 *
 * @author shenguangyang
 */
public class ShopCons {

    /**
     * 二维码类型
     */
    public interface QrCodeType {
        String WEIXIN_MA = "weixin_ma";
        String H5 = "h5";
    }

    /**
     * 商品包装类型
     */
    public interface BagType {
        // 0按商品收费, 1按单收费
        String GOODS = "0";
        String ORDER = "1";
    }

    /**
     * 商品类型
     */
    public interface GoodsType {
        /**
         * 外卖
         */
        String TAKE_OUT = "0";
        /**
         * 店内 (打包带走/店内就餐)
         */
        String TAKE_IN = "1";
    }

    /**
     * 配送方式
     */
    public static class DeliveryWay {
        // 快递发货
        public static final String EXPRESS = "1";
        // 同城配送
        public static final String CITY_DELIVERY = "2";
        // 到店自提
        public static final String SELF_EXTRACT = "3";
        // 店内就餐
        public static final String TAKE_IN = "4";
        // 打包带走
        public static final String TAKE_OUT = "5";

        /**
         * 判断是否需要打包
         */
        public static boolean isBag(String deliveryWay) {
            return !DeliveryWay.TAKE_IN.equals(deliveryWay);
        }

    }
}
